package com.atguigu05.map.ex2;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Scanner;

public class t2 {
//    public static void main(String[] args) {
//        Iterator iterator=Citymap.model.keySet().iterator();
//        while(iterator.hasNext()){
//            System.out.print(iterator.next()+"\t");
//        }
//        System.out.println();
//        Scanner scanner=new Scanner(System.in);
//        while (true) {
//            System.out.println("请输入你要选择的省份：");
//            String province=scanner.nextLine();
//            if(Citymap.model.keySet().contains(province)){
//                String[] cities =(String[]) Citymap.model.get(province);
//                for (Object obj:
//                    cities ) {
//                    System.out.println(obj);
//                }
//                int c=0;
//                System.out.println("请输入你要选择的城市：");
//                String city=scanner.nextLine();
//                while(c<cities.length){
//                    if(cities[c].equals(city)){
//                        System.out.println("选择完毕");
//                        continue;
//                    }
//                    c++;
//                }
//
//                break;
//            }else {
//                System.out.println("省份不存在，请重新输入： ");
//            }
//        }
//
//    }
}


// class Citymap {
//    public static Map model = new HashMap();
//    static {
//        model.put("北京",new String[] {"北京"});
//        model.put("辽宁",new String[] {"沈阳", "盘锦","铁岭","丹东","大连","锦州","营口"});
//        model.put("吉林",new String[]{"长春" ,"延边", "吉林", "白山","白城", "四平", "松原"});
//        model.put("河北",new String[] {"承德","沧州","邯郸","邢台","唐山","保定","石家庄"});
//        model.put("河南",new String[]{"郑州", "许昌", "开封" ,"洛阳","商丘","南阳","新乡"});
//        model.put("山东",new String[]{"济南","青岛","日照","临沂","泰安","聊城","德州"});
//    }
//}